unit KnjigaIzdanihRacunovFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DokumentVnosFrm, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxEdit, DB, cxDBData, cxGridBandedTableView, DBClient, MConnect,
  alBaseDataSet, cxEditRepositoryItems, cxContainer, StdActns, ActnList,
  cxGridLevel, cxGridCustomTableView, cxGridTableView,
  cxGridDBBandedTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
  cxDBEdit, cxDropDownEdit, cxCalendar, cxTextEdit, cxMaskEdit, StdCtrls,
  ExtCtrls, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox,
  cxDBEditRepository, cxCurrencyEdit, ImgList, PoslovanjeSrv_TLB,
  cxDataStorage, cxExtEditRepositoryItems, cxCheckComboBox,
  cxDBCheckComboBox, alActions, kdbinfo, kdbstruc;

type
  TfrmKnjigaIzdanihRacunov = class(TfrmDokumentVnos)
    grpbxRacun: TGroupBox;
    lblStevilkaDokumenta: TLabel;
    lblDatumDokumenta: TLabel;
    lblPoslovniPartner: TLabel;
    lblVrednostZDDV: TLabel;
    edtStevilkaDokumenta: TcxDBMaskEdit;
    edtDatumDokumenta: TcxDBDateEdit;
    edtVrednostZDDV: TcxDBCurrencyEdit;
    lkpcbPoslovniPartner: TcxDBLookupComboBox;
    grpbxOproscenPromet: TGroupBox;
    lblOPRBrezOdbitka: TLabel;
    edtOPRBrezOdbitka: TcxDBCurrencyEdit;
    lblOPRIzvoz: TLabel;
    edtOPRIzvoz: TcxDBCurrencyEdit;
    lblOPRZOdbitkom: TLabel;
    edtOPRZOdbitkom: TcxDBCurrencyEdit;
    grpbxObdavcenPromet: TGroupBox;
    grpbxOBDDavcnimZavezancem: TGroupBox;
    grpbxOBDKoncnimPotrosnikom: TGroupBox;
    lblDatumPlacila: TLabel;
    lblNacinPlacila: TLabel;
    edtDatumPlacila: TcxDBDateEdit;
    edtNacinPlacila: TcxDBTextEdit;
    rpstMainStevilkaDokumenta: TcxEditRepositoryMaskItem;
    rpstMainNacinPlacila: TcxEditRepositoryTextItem;
    scnPoslovniPartner: TSharedConnection;
    cdsPoslovniPartner: TBaseDataSet;
    dtsrcPoslovniPartner: TDataSource;
    rpstMainPoslovniPartnerNaziv: TcxEditRepositoryLookupComboBoxItem;
    rpstMainZnesek: TcxEditRepositoryCurrencyItem;
    lblOBDDZZSOsnova: TLabel;
    edtOBDDZZSOsnova: TcxDBCurrencyEdit;
    lblOBDDZZSDDV: TLabel;
    edtOBDDZZSDDV: TcxDBCurrencyEdit;
    lblOBDDZOSOsnova: TLabel;
    edtOBDDZOSOsnova: TcxDBCurrencyEdit;
    lblOBDDZOSDDV: TLabel;
    edtOBDDZOSDDV: TcxDBCurrencyEdit;
    lblOBDKPZSOsnova: TLabel;
    edtOBDKPZSOsnova: TcxDBCurrencyEdit;
    lblOBDKPZSDDV: TLabel;
    edtOBDKPZSDDV: TcxDBCurrencyEdit;
    lblOBDKPOSOsnova: TLabel;
    edtOBDKPOSOsnova: TcxDBCurrencyEdit;
    lblOBDKPOSDDV: TLabel;
    edtOBDKPOSDDV: TcxDBCurrencyEdit;
    actnKnjigaIzdanihRacunov: TReportPrint;
  private
    { Private declarations }
  protected
    procedure Deinitialize; override;
    procedure DoDBRefresh; override;
    procedure Initialize; override;
  public
    { Public declarations }
  end;

var
  frmKnjigaIzdanihRacunov: TfrmKnjigaIzdanihRacunov;

implementation

uses
 MainFrm, KnjigaIzdanihRacunovRpt;

{$R *.dfm}

{ TfrmKnjigaIzdanihRacunov }

procedure TfrmKnjigaIzdanihRacunov.Deinitialize;
begin
  cdsPoslovniPartner.Close;
  inherited;
end;

procedure TfrmKnjigaIzdanihRacunov.DoDBRefresh;
begin
  inherited;
  cdsPoslovniPartner.Refresh;
end;

procedure TfrmKnjigaIzdanihRacunov.Initialize;
begin
  inherited;
  cdsPoslovniPartner.Open;
end;

end.
